<?php /* Smarty version 2.6.26, created on 2010-11-14 22:43:29
         compiled from new_practice.tpl */ ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "header.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<?php if (isset ( $this->_tpl_vars['info'] )): ?>
	<div class="info i_red">
		<?php echo $this->_tpl_vars['info']; ?>

	</div>
<?php endif; ?>			
<?php if (isset ( $_SESSION['user_id'] )): ?>
<h3>Nowa oferta praktyki</h3>
<form action="new_practice.php" method="post" class="form" id="new_practice">
	<fieldset>
		<legend>Formularz dodania nowej praktyki</legend>
			<?php if ($_SESSION['user_type'] == 'user_company'): ?>
				<?php $_from = $_SESSION['company_info']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['company']):
?>
				<?php endforeach; endif; unset($_from); ?>
				<input type="hidden" name="company_id" id="company_id" value="<?php echo $this->_tpl_vars['company']['id']; ?>
"/>
				<p>
					<label for="company_name" >Nazwa firmy</label>
					<?php echo $this->_tpl_vars['company']['name']; ?>

				</p>
				
				<p>
					<label for="company_address" >Adres</label>
					<?php echo $this->_tpl_vars['company']['address']; ?>

				</p>
				
				<p>
					<label for="company_phone" >Telefon</label>
					<?php echo $this->_tpl_vars['company']['phone']; ?>

				</p>
				
				<p>
					<label for="company_site" >Strona www</label>
					<a href="http:\\<?php echo $this->_tpl_vars['company']['site']; ?>
" target=_blank><?php echo $this->_tpl_vars['company']['site']; ?>
</a>
				</p>
				
				<p>
					<label for="company_person" >Osoba reprezentująca</label>
					<select id="company_person" name="company_person" >
						<?php $_from = $this->_tpl_vars['company_persons']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['person']):
?> 
							<option value="<?php echo $this->_tpl_vars['person']['id']; ?>
"><?php echo $this->_tpl_vars['person']['name']; ?>
 <?php echo $this->_tpl_vars['person']['surname']; ?>
</option>
						<?php endforeach; endif; unset($_from); ?>
					</select>
				</p>
			<?php endif; ?>
				<p>
					<label for="date_start" >Od dnia (RRRR-MM-DD)</label>
					<input type="text" id="date_start" name="date_start" title="Od dnia"/>
				</p>
			
				<p>
					<label for="date_end" >Do dnia (RRRR-MM-DD)</label>
					<input type="text" id="date_end" name="date_end" title="Do dnia"/>
				</p>
			
				<p>
					<label for="amount" >Ilość miejsc</label>
					<input type="text" id="amount" name="amount" title="Ilość miejsc"/>
				</p>
			
				<p>
					<label for="paid" >Praktyka płatna?</label>
					<input type="checkbox" id="paid" name="paid" />
				</p>
				
				<p>
					<label for="duties" >Zakres obowiązków</label>
					<textarea name="duties" id="duties" rows="5" cols="20" ></textarea>
				</p>
			
				<p>
					<label for="requirements" >Wymagania</label>
					<textarea name="requirements" id="requirements" rows="5" cols="20" ></textarea>
				</p>
			
				<p>
					<label for="technology" >Technologie</label><br/>
					<div style="padding-left:110px;width:230px">
					<?php $_from = $this->_tpl_vars['technologies']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['tech']):
?>
						<input type="checkbox" name ="tech[]" id="tech_id_<?php echo $this->_tpl_vars['tech']['id']; ?>
" value="<?php echo $this->_tpl_vars['tech']['technology']; ?>
" /> <?php echo $this->_tpl_vars['tech']['technology']; ?>
 <br/>
					<?php endforeach; endif; unset($_from); ?>
					</div>
				</p>
				
						

			<?php if ($_SESSION['user_type'] == 'user_student'): ?>
			
			<?php endif; ?>
			
	</fieldset>
	<p class="submit"><button type="submit" id="send" name="send">Dodaj</button></p>
</form>
<?php endif; ?>

<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "footer.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>